-- GENERATED SPELL FOR [Haalum] --


function spell0_21711(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21711', 3000, 1)
end

function spell1_21711(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21711', 3000, 1)
end

function Sorts_21711(pUnit, Event)
local choix_sorts_21711 = math.random(0, 1)
if choix_sorts_21711 == 0 then
pUnit:RegisterEvent('spell0_21711', 1, 1)
end
if choix_sorts_21711 == 1 then
pUnit:RegisterEvent('spell1_21711', 1, 1)
end
end

function mob21711_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21711', math.random(1500, 3000), 1)
end

function mob21711_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21711_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21711_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21711, 1, 'mob21711_Action')
RegisterUnitEvent(21711, 2, 'mob21711_Leave')
RegisterUnitEvent(21711, 3, 'mob21711_Kill')
RegisterUnitEvent(21711, 4, 'mob21711_Die')
